﻿@model IEnumerable<MvcDemo.Move.Models.Movie>
@{
    ViewBag.Title = "Index";
}
@{
    var grid = new WebGrid(Model, defaultSort: "id", rowsPerPage: 3);
}
@{
    //WebMail.SmtpServer = "smtp.126.com";
    //WebMail.SmtpPort = 25;
    //WebMail.UserName = "enn_zdj";
    //WebMail.Password = "zxy%123456";
    //WebMail.From = "zdj@900ku.com";
    //WebMail.EnableSsl = false;
    //WebMail.Send(to: "enn_zdj@126.com", subject: "mvc mail test", body: "no body");
    
}
@ViewBag.Hi
@grid.GetHtml(tableStyle: "grid", headerStyle: "header"
        , columns: grid.Columns(
                   grid.Column(format: (item) => Html.ActionLink("Edit", "Edit", "Movies", "Http", "www.900ku.com", "", new { id = item.ID }, new { @class = "test" })),
                   grid.Column("Id", "编码"),
                   grid.Column("Title", "名称", canSort: false),
                   grid.Column("Price", "价格", canSort: false)))
<h2>
    Index</h2>
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
        </th>
        <th>
            Title
        </th>
        <th>
            Release Date
        </th>
        <th>
            Genre
        </th>
        <th>
            Price
        </th>
        <th>
            Rating
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
                @Html.ActionLink("Details", "Details", new { id = item.ID }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.ID })
            </td>
            <td>
                @item.Title
            </td>
            <td>
                @String.Format("{0:d}", item.ReleaseDate)
            </td>
            <td>
                @item.Genre
            </td>
            <td>
                @String.Format("{0:c}", item.Price)
            </td>
            <td>
                @item.Rating
            </td>
        </tr>
    }
</table>
@{
    //var chart = new Chart(600, 400,theme: ChartTheme.Yellow).AddTitle("Chart Test", name: "ChartId")
    //    .AddSeries("员工", chartType: "Pie"
    //    , xValue: new[] { "一月份", "二月份", "三月份", "四月份", "五月份", "六月份", "七月份", "八月份", "九月份" }
    //    , yValues: new[] { "2", "6", "4", "5", "3", "4", "9", "2", "5" })
    //    .Write();
    //chart.AddLegend(title: "legend",name:"legend value");
}
@{
    var showTime = true;
    if (showTime)
    {
    @DateTime.Now.ToString();
    }
    @:Really<br />
@*<Text>Sorry!</Text>*@
    @:Sorry
}
@Href("/a/a.aspx")
